<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/loginServer/jquery-3.6.0.js"></script>
</head>
<body>
<span>消息内容</span><input type="text" name="msgContent" id="msgContent">
<span>接收人用户id</span><input type="text" name="userId" id="userId">
<button onclick="send()">发送</button>
</body>
<script>
    function send(){
        $.post({
            url:"/loginServer/pushMsg",
            data:{
                "msgContent":$("#msgContent").val(),
                "userId":$("#userId").val()
            },
            success(){
                window.alert("发送成功");
            }
        })
    }
</script>
</html>